package servicesImp.business;


import base.IBaseMapperWithoutBLOBs;
import base.IBaseServicesWithoutBLOBsImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import services.business.BusinessMajorServices;
import wt.dao.business.BusinessMajorMapper;
import wt.entity.business.BusinessMajor;
import wt.entity.business.BusinessMajorExample;
import wt.staticData.TableName;

import java.util.List;

/**
 * Created by Administrator on 2017/10/14.
 */
@Service
public class BusinessMajorServicesImp extends IBaseServicesWithoutBLOBsImpl<  BusinessMajor, BusinessMajorExample> implements BusinessMajorServices {
    @Autowired
    BusinessMajorMapper businessMajorMapper;

    @Override
    public IBaseMapperWithoutBLOBs<BusinessMajor, BusinessMajorExample> getMapper() {
        return this.businessMajorMapper;
    }

    @Override
    public String getTableName() {
        return TableName.BUS_BUSINESS_MAJOR;
    }


    public List<BusinessMajor> selectByBusinessId(String businessId) throws Exception {
        BusinessMajorExample businessMajorExample = new BusinessMajorExample();
        businessMajorExample.createCriteria().andBusinessIdEqualTo(businessId);
        return selectByExample(businessMajorExample);

    }
}
